/**
 * 设备资产管理
 */
(function(window, angular, undefined){
	var assetsRegisterModule = angular.module('water.entity.assetsRegister', ['waterCommon']);
	
	assetsRegisterModule.service('$assetsRegisterService',function($waterDataCommon){
		
		/**
		 * 获取设备资产数据
		 * MN:''
		 * station_code:''
		 * is_oos:''
		 */
		this.getList = function(queryObj){
			var promise = $waterDataCommon.post("/AssetsRegisterController/getList",queryObj);
			return promise;
		}
		/**
		 * 新建设备资产数据
		 */
		this.createModel = function(assetsRegister){
			var promise = $waterDataCommon.createModel("BC_ASSETS_REGISTER",assetsRegister);
			return promise;
		}
		/**
		 * 新建设备资产生命周期数据
		 */
		this.createLifecycleModel = function(device_lifecycle){
			var promise = $waterDataCommon.createModel("BC_DEVICE_LIFECYCLE",device_lifecycle);
			return promise;
		}
		/**
		 * 更新设备资产数据
		 */
		this.updateModel = function(assetsRegister){
			var promise = $waterDataCommon.updateModel("BC_ASSETS_REGISTER",assetsRegister);
			return promise;
		}
		/**
		 * 更新设备资产生命周期数据
		 */
		this.updateLifecycleModel = function(device_lifecycle){
			var promise = $waterDataCommon.updateModel("BC_DEVICE_LIFECYCLE",device_lifecycle);
			return promise;
		}
		/**
		 * 删除设备资产数据
		 */
		this.deleteModel = function(id){
			var promise = $waterDataCommon.deleteModel("BC_ASSETS_REGISTER",{key:id});
			return promise;
		}
		/**
		 * 删除设备资产生命周期数据
		 */
		this.deleteLifecycleModel = function(id){
			var promise = $waterDataCommon.deleteModel("BC_DEVICE_LIFECYCLE",{key:id});
			return promise;
		}
	});
}(window, angular));